<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

    <head>
        <meta charset="utf-8" />
        <title>公告管理</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
        <meta content="" name="author" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />

        <!-- App favicon -->
        <link rel="shortcut icon" href="../assets/images/favicon.ico">

        <link href="../../plugins/summernote/summernote-bs4.css" rel="stylesheet" />

        <!-- App css -->
        <link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="../assets/css/jquery-ui.min.css" rel="stylesheet">
        <link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
        <link href="../assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
        <link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" />

    </head>

    <body>

    <!-- Top Bar Start -->
    <div th:replace="~{common/top-nav::top-nav}"></div>
    <!-- Top Bar End -->


    <!-- Left Sidenav -->
    <div th:replace="~{common/left-side-nav::left-side-nav}"></div>
    <!-- end left-sidenav-->

        <div class="page-wrapper">

            <!-- Page Content-->
            <div class="page-content">

                <div class="container-fluid">
                    <!-- Page-Title -->
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="page-title-box">
                                <div class="float-right">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="javascript:void(0);">办公自动化</a></li>
                                        <li class="breadcrumb-item"><a href="javascript:void(0);">公告管理</a></li>
                                        <li class="breadcrumb-item active">管理公告</li>
                                    </ol>
                                </div>
                                <h4 class="page-title">管理公告</h4>
                            </div><!--end page-title-box-->
                        </div><!--end col-->
                    </div>
                    <!-- end page title end breadcrumb -->
                    <div class="row"  >
                        <div class="col-12">
                            <!-- Left sidebar -->
                            <div class="email-leftbar">
                                <button type="button" class="btn btn-gradient-danger btn-round btn-custom btn-block waves-effect waves-light" data-toggle="modal" data-animation="bounce" data-target=".compose-modal">
                                    <i class="fas fa-feather-alt mr-2"></i>Compose
                                </button>

                                <div class="card mt-3">
                                    <div class="card-body">
                                        <div class="mail-list">
                                            <a href="#" class="active pt-0">Inbox <span class="ml-1">(5)</span></a>
                                            <a href="#">Starred</a>
                                            <a href="#">Important</a>
                                            <a href="#">Draft</a>
                                            <a href="#">Sent Mail</a>
                                            <a href="#">Trash</a>
                                        </div>
        
                                        <h5 class="my-4">Labels</h5>
                                        <div class="mail-list">
                                            <a href="#"><span class="mdi mdi-arrow-right-drop-circle text-info float-right mt-1 mr-1"></span>Theme Support</a>
                                            <a href="#"><span class="mdi mdi-arrow-right-drop-circle text-warning float-right mt-1 mr-1"></span>Freelance</a>
                                            <a href="#"><span class="mdi mdi-arrow-right-drop-circle text-purple float-right mt-1 mr-1"></span>Social</a>
                                            <a href="#"><span class="mdi mdi-arrow-right-drop-circle text-pink float-right mt-1 mr-1"></span>Friends</a>
                                            <a href="#"><span class="mdi mdi-arrow-right-drop-circle text-success float-right mt-1 mr-1"></span>Family</a>
                                        </div>
        
                                        <h5 class="my-4">Chat</h5>
                                        <div class="">
                                            <a href="#" class="media">
                                                <img class="d-flex mr-3 rounded-circle" src="../assets/images/users/user-1.jpg" alt="Generic placeholder image" height="36">
                                                <div class="media-body chat-user-box">
                                                    <p class="user-title m-0">Scott Median</p>
                                                    <p class="text-muted">Hello</p>
                                                </div>
                                            </a>
        
                                            <a href="#" class="media">
                                                <img class="d-flex mr-3 rounded-circle" src="../assets/images/users/user-2.jpg" alt="Generic placeholder image" height="36">
                                                <div class="media-body chat-user-box">
                                                    <p class="user-title m-0">Julian Rosa</p>
                                                    <p class="text-muted">What about our next..</p>
                                                </div>
                                            </a>
        
                                            <a href="#" class="media">
                                                <img class="d-flex mr-3 rounded-circle" src="../assets/images/users/user-3.jpg" alt="Generic placeholder image" height="36">
                                                <div class="media-body chat-user-box">
                                                    <p class="user-title m-0">David Medina</p>
                                                    <p class="text-muted">Yeah everything is fine</p>
                                                </div>
                                            </a>
        
                                            <a href="#" class="media">
                                                <img class="d-flex mr-3 rounded-circle" src="../assets/images/users/user-4.jpg" alt="Generic placeholder image" height="36">
                                                <div class="media-body chat-user-box">
                                                    <p class="user-title m-0">Jay Baker</p>
                                                    <p class="text-muted">Wow that's great</p>
                                                </div>
                                            </a>
                                        </div>
                                    </div><!-- end card-body -->
                                </div><!-- end card -->
                            </div>
                            <!-- End Left sidebar -->


                            <!-- Right Sidebar -->
                            <div class="email-rightbar">

                                <div class="float-right d-flex justify-content-between">
                                    <div class="btn-group ml-1">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            <i class="fas fa-question-circle"></i>
                                        </button>
                                        <div class="dropdown-menu dropdown-menu-right">
                                            <a class="dropdown-item" href="#">Updates</a>
                                            <a class="dropdown-item" href="#">Social</a>
                                            <a class="dropdown-item" href="#">Team Manage</a>
                                        </div>
                                    </div>
                                    <div class="btn-group ml-1">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            <i class="fas fa-cog"></i>
                                        </button>
                                        <div class="dropdown-menu dropdown-menu-right">
                                            <a class="dropdown-item" href="#">Display density</a>
                                            <a class="dropdown-item" href="#">Themes</a>
                                            <a class="dropdown-item" href="#">Help</a>
                                        </div>
                                    </div>
                                </div><!-- end div -->
                                <div class="btn-toolbar" role="toolbar">
                                    <div class="btn-group">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect"><i class="fas fa-inbox"></i></button>
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect"><i class="fas fa-exclamation-circle"></i></button>
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect"><i class="fas fa-trash"></i></button>
                                    </div>
                                    <div class="btn-group ml-1">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            <i class="fas fa-folder"></i><i class="mdi mdi-chevron-down ml-1"></i>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">Updates</a>
                                            <a class="dropdown-item" href="#">Social</a>
                                            <a class="dropdown-item" href="#">Team Manage</a>
                                        </div>
                                    </div>
                                    <div class="btn-group ml-1">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            <i class="fas fa-tag"></i><i class="mdi mdi-chevron-down ml-1"></i>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">Updates</a>
                                            <a class="dropdown-item" href="#">Social</a>
                                            <a class="dropdown-item" href="#">Team Manage</a>
                                        </div>
                                    </div>

                                    <div class="btn-group ml-1">
                                        <button type="button" class="btn btn-gradient-info waves-light waves-effect dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            More<i class="mdi mdi-chevron-down ml-1"></i>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="#">Mark as Unread</a>
                                            <a class="dropdown-item" href="#">Mark as Important</a>
                                            <a class="dropdown-item" href="#">Add to Tasks</a>
                                            <a class="dropdown-item" href="#">Add Star</a>
                                            <a class="dropdown-item" href="#">Mute</a>
                                        </div>
                                    </div>
                                </div><!-- end toolbar -->


                                <div class="card my-3" >
                                    <div class="row">
                                        <div class="col-12">
                                            <div class="card">
                                                <div class="card-body">

                                                    <h4 class="mt-0 header-title">用户信息表</h4>
                                                    <p class="text-muted mb-3">Add toolbar column with edit and delete buttons.</p>
                                                    <div class="table-responsive">
                                                        <table class="table  table-bordered" id="makeEditable">
                                                            <thead>
                                                            <tr>
                                                                <th>公共ID</th>
                                                                <th>标题</th>
                                                                <th>内容</th>
                                                                <th>发布者姓名</th>
                                                                <th>发布时间</th>
                                                                <th name="buttons"></th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr th:each="notice : ${page.list}">
                                                                <td th:text="${noticeStat.count}"></td>
                                                                <td th:text="${notice.title}"></td>
                                                                <td th:text="${notice.content}"></td>
                                                                <td th:text="${notice.user != null ? notice.user.name : ''}"></td>
                                                                <td th:text="${notice.releaseTime}"></td>
                                                                <td name="buttons">
                                                                    <div class=" pull-right">
                                                                        <a th:href="@{/notice/notice_modify(id=${notice.id},pageSize=${page.pageSize},pageNum=${page.pageNum},keyword=${param.keyword})}" class="mr-2">
                                                                        <button id="bEdit" type="button" class="btn btn-sm btn-soft-success  mr-2" onclick="rowEdit(this);">
                                                                            <i class="dripicons-pencil"></i>
                                                                        </button></a>
                                                                        <a th:href="@{/notice/notice_remove(id=${notice.id},pageSize=${page.pageSize},pageNum=${page.pageNum},keyword=${param.keyword})}">
                                                                                <button id="bElim" type="button" class="btn btn-sm btn-soft-danger btn-circle" onclick="rowElim(this);">
                                                                            <i class="dripicons-trash" aria-hidden="true"></i>
                                                                        </button></a>
                                                                        <button id="bAcep" type="button" class="btn btn-sm btn-soft-purple mr-2 btn-circle" style="display:none;" onclick="rowAcep(this);">
                                                                            <i class="dripicons-checkmark"></i>
                                                                        </button>
                                                                        <button id="bCanc" type="button" class="btn btn-sm btn-soft-info btn-circle" style="display:none;" onclick="rowCancel(this);">
                                                                            <i class="dripicons-cross" aria-hidden="true"></i>
                                                                        </button>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                    </span>
                                                    <span class="float-right">
                                        <a th:href="@{/notice/notice_add}"> <button id="but_add" class="btn btn-danger">添加新公告</button></a>
                                    </span><!--end table-->
                                                </div><!--end card-body-->
                                            </div><!--end card-->
                                        </div> <!-- end col -->
                                    </div>
                                </div> <!-- panel -->

                                <div class="row mb-3">
                                    <div class="col-7 align-self-center">
                                        Showing 1 - 20 of 1,524
                                    </div><!-- end Col -->
                                    <div class="col-5">
                                        <div class="btn-group float-right">
                                            <button type="button" class="btn btn-sm btn-gradient-primary waves-effect mb-0"><i class="fa fa-chevron-left"></i></button>
                                            <button type="button" class="btn btn-sm btn-gradient-primary waves-effect mb-0"><i class="fa fa-chevron-right"></i></button>
                                        </div>
                                    </div><!-- end Col -->
                                </div> <!--end row-->
                            </div> <!-- end email-rightbar -->


                        </div><!-- end Col -->
                    </div><!-- End row -->

                </div><!-- container -->

                 <!-- Modal -->

                 <div class="modal fade compose-modal" tabindex="-1" role="dialog" aria-hidden="true">
                    <div class="modal-dialog modal-dialog-centered">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title mt-0" id="exampleModalLabel">Compose Mail</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="card mb-0 p-3">
                                    <form>
                                        <div class="form-group mb-3">
                                            <input type="email" class="form-control" placeholder="To">
                                        </div><!--end form-group-->
                                        <div class="form-group mb-3">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="email" class="form-control" placeholder="Cc">
                                                </div>
                                                <div class="col-md-6">
                                                    <input type="email" class="form-control" placeholder="Bcc">
                                                </div>
                                            </div>
                                        </div><!--end form-group-->
                                        <div class="form-group mb-3">
                                            <input type="text" class="form-control" placeholder="Subject">
                                        </div><!--end form-group-->
                                        <div class="form-group mb-3">
                                            <div class="summernote">
                                                <h6>Hello Summernote</h6>
                                                <ul>
                                                    <li>
                                                        Select a text to reveal the toolbar.
                                                    </li>
                                                    <li>
                                                        Edit rich document on-the-fly, so elastic!
                                                    </li>
                                                </ul>
                                                <p>
                                                    End of air-mode area
                                                </p>
            
                                            </div>
                                        </div><!--end form-group-->
            
                                        <div class="btn-toolbar form-group mb-0">
                                            <div class="pull-right">
                                                <button type="button" class="btn btn-gradient-info waves-effect waves-light"><span>Print</span><i
                                                        class="far fa-save ml-3"></i></button>
                                                <button class="btn btn-gradient-primary waves-effect waves-light"><span>Send</span> <i
                                                    class="far fa-paper-plane ml-3"></i></button>
                                                <button type="button" class="btn btn-gradient-danger waves-effect waves-light "><span>Delete</span><i
                                                        class="far fa-trash-alt ml-3"></i></button>                                                
                                            </div>
                                        </div><!--end form-group-->
                                    </form><!--end form-->
                                </div><!--end card-->
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal-dialog -->
                </div><!-- /.modal -->

                <footer class="footer text-center text-sm-left">
                    &copy; 2022办公自动化 <span class="text-muted d-none d-sm-inline-block float-right"><i class="mdi mdi-heart text-danger"></i> 来自 <a href="#">4228</a></span>
                </footer><!--end footer-->
            </div>
            <!-- end page content -->
        </div>
        <!-- end page-wrapper -->

        


        <!-- jQuery  -->
        <script src="../assets/js/jquery.min.js"></script>
        <script src="../assets/js/bootstrap.bundle.min.js"></script>
        <script src="../assets/js/metismenu.min.js"></script>
        <script src="../assets/js/waves.js"></script>
        <script src="../assets/js/feather.min.js"></script>
        <script src="../assets/js/jquery.slimscroll.min.js"></script>
        <script src="../assets/js/jquery-ui.min.js"></script>

        <script src="../../plugins/summernote/summernote-bs4.min.js"></script>

        <!-- App js -->
        <script src="../assets/js/app.js"></script>
        <script>
            jQuery(document).ready(function(){

                $('.summernote').summernote({
                    height: 320,                 // set editor height
                    minHeight: null,             // set minimum height of editor
                    maxHeight: null,             // set maximum height of editor
                    focus: false                 // set focus to editable area after initializing summernote
                });
            });
            
            $('li').click(function () {
                $('input:not(:checked)').parent().parent().parent().removeClass("unread");
                $('input:checked').parent().parent().parent().addClass("unread");
            });
            $('input:checked').parent().parent().parent().addClass("unread");

            // 为删除按钮注册单击事件
            $('.btn-circle').click(function (event){
                // 如果在<a> 上的单击事件处理器函数返回false，就会进<a>的默认行为
                return confirm('是否要删除？');
            })
        </script>   
        
    </body>

</html>